java How to find Longest Common Subsequence in Java